package cn.group01.git.controller;

import cn.group01.git.annotations.LogOperation;
import cn.group01.git.common.Operation;
import cn.group01.git.service.EchartsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Map;

/**
 * @description:
 * @author: 张 庆 昌
 * @date: 2023/7/13 9:37
 **/
@RestController
@RequestMapping("echarts")
public class EchartsController {

    @Autowired
    private EchartsService echartsService;


    // 获取供应商入库年度总金额折线图数据
    @GetMapping("import")
    @LogOperation(description = Operation.OTHER,model = "Echarts入库模块")
    public Map<String,Object> getInportLineData(){

        return echartsService.getInportLineData();
    }
    // 获取代理商出库年度总金额折线图数据
    @GetMapping("outport")
    @LogOperation(description = Operation.OTHER,model = "Echarts出库模块")
    public Map<String,Object> getOutportLineData(){

        return echartsService.getOutportLineData();
    }
}
